xen/arm: arm64: Add Cortex-A53 cache errata workaround
authorJulien Grall <julien.grall@arm.com>
Wed, 27 Jul 2016 16:37:09 +0000 (17:37 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 3 Aug 2016 19:47:07 +0000 (15:47 -0400)
commited6869d1387d5c6dd336f6fea8404c1ba8a89cbd
tree13742c1c8f8d55a2933423bf1c0653503b182e69
parent1c3463f371cefac5a2a7f206991501e19abb98fc
xen/arm: arm64: Add Cortex-A53 cache errata workaround

The ARM errata 819472, 827319 and 824069 define the same workaround for
these hardware issues in certain Cortex-A53 parts.

The cache instructions "dc cvac" and "dc cvau" need to be upgraded to
"dc civac".

Use the alternative framework to replace those instructions only on
affected cores.

Whilst the errata affect cache instructions issued at any exception
level, it is not necessary to trap EL1/EL0 data cache instructions
access in order to upgrade them. Indeed the data cache corruption would
always be at the address used by the data cache instructions. Note that
this address could point to a shared memory between guests and the
hypervisors, however all the information present in it are be validated
before any use.

Therefore a malicious guest could only hurt itself. Note that all the
guests should implement/enable the workaround for the affected cores.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
docs/misc/arm/silicon-errata.txt
xen/arch/arm/Kconfig
xen/arch/arm/arm64/cache.S
xen/arch/arm/cpuerrata.c
xen/include/asm-arm/arm64/page.h
xen/include/asm-arm/cpufeature.h
xen/include/asm-arm/processor.h